import { IsNotEmpty, IsString, Length } from "class-validator";
import { ApiProperty } from "@nestjs/swagger";
export class LoginDto {
    @IsString()
    @IsNotEmpty()
    @Length(1, 50, {
        message: '用户不能超过50个字母',
    })
    @ApiProperty({
        required: true,
        description: '账号'
    })
    oper: string;

    @IsString()
    @IsNotEmpty()
    @ApiProperty({
        required: true,
        description: '密码'
    })
    pw: string;

    @IsString()
    @IsNotEmpty()
    @Length(4, 4, {
        message: '验证码必须为4位'
    })
    @ApiProperty({
        required: true,
        description: '验证码'
    })
    captcha: string;
}
